# Maintainer: André Klitzing <aklitzing@gmail.com>
# Contributor: André Klitzing <aklitzing@gmail.com>
pkgname=toybox
pkgver=0.8.10
pkgrel=0
pkgdesc="A BSD-licensed alternative to busybox"
arch="all"
license="0BSD"
url="https://landley.net/toybox/"
depends="attr"
makedepends="bash linux-headers"
source="https://landley.net/toybox/downloads/toybox-$pkgver.tar.gz"

build() {
	# Disable FORTIFY until build is fixed
	export CFLAGS=-U_FORTIFY_SOURCE

	scripts/genconfig.sh
	make defconfig
	make
}

check() {
	make test
}

package() {
	install -Dm755 toybox "$pkgdir"/bin/toybox
}

sha512sums="
b2c36bc4e41741893a4fe039dd653f552ab987b948f78c1e5d04abb13ffbb8f898af636967739067877afef9ac0af10c259f674acdc4a80084a846fb02742461  toybox-0.8.10.tar.gz
"
